//
//  JSToolkitTests.m
//  JSToolkitTests
//
//  Created by 정재성 on 2013. 10. 28..
//  Copyright (c) 2013년 정재성. All rights reserved.
//

#import <XCTest/XCTest.h>
#import "UIView+Frame.h"

@interface JSToolkitTests : XCTestCase
{
    UIView *view;
}

@end

@implementation JSToolkitTests

- (void)setUp
{
    [super setUp];
    view = [[UIView alloc] initWithFrame:CGRectZero];
}

- (void)tearDown
{
    [super tearDown];
}

- (void)testOrigin
{
    view.x = 10.0f;
    XCTAssertEqual(view.x, 10.0f, @"x point is not equals.");

    view.y = 20.0f;
    XCTAssertEqual(view.y, 20.0f, @"y point is not equals.");

    view.origin = CGPointMake(100.0f, 200.0f);
    XCTAssertEqual(view.origin, CGPointMake(100.0f, 200.0f), @"origin is not equals.");
}

- (void)testSize
{
    view.width = 10.0f;
    XCTAssertEqual(view.width, 10.0f, @"width is not equlas.");

    view.height = 20.0f;
    XCTAssertEqual(view.height, 20.0f, @"height is not equals.");

    view.size = CGSizeMake(100.0f, 200.0f);
    XCTAssertEqual(view.size, CGSizeMake(100.0f, 200.0f), @"size is not equals.");
}

@end
